package com.freesky.biz.psbc.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.freesky.common.annotation.Desensitized;
import com.freesky.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * 邮储券发券
 */
@Data
@ContentRowHeight(22)
@ColumnWidth(25)
@HeadRowHeight(25)
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft= BorderStyleEnum.THIN,
        borderRight= BorderStyleEnum.THIN,
        borderTop= BorderStyleEnum.THIN,
        borderBottom= BorderStyleEnum.THIN)//表头样式
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft= BorderStyleEnum.THIN,
        borderRight= BorderStyleEnum.THIN,
        borderTop= BorderStyleEnum.THIN,
        borderBottom= BorderStyleEnum.THIN)
public class TPsbcCoupon implements java.io.Serializable {
    /**
     * 记录ID号
     */
    @ExcelIgnore
    private String id;

    //第三券的ID
    @ExcelProperty("活动ID")
    private String thirdCpnId;

    //第三方券的名称
    @ExcelProperty("活动名称")
    private String thirdCpnName;

    //手机号码
    @ExcelProperty("手机号码")
    @Desensitized(type = Desensitized.DesensitizedType.PHONE)
    private String mobile;

    /**
     * 请求流水号
     */
    @ExcelProperty("请求流水号")
    private String reqNo;

    //订单号
    @ExcelProperty("订单号")
    private String orderNo;

    //发券的关态：1、成功，2、 失败
    @ExcelProperty("状态")
    private String status;

    @ExcelProperty("描述")
    private String remarks;

    //发券数量
    @ExcelIgnore
    private Integer totalCount;

    //成功数量
    @ExcelIgnore
    private Integer successCount;

    @ExcelIgnore
    private String createTime;

    @ExcelProperty("处理时间")
    private String updateTime;

    @ExcelIgnore
    private String delFlag;

    @ExcelIgnore
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> params;

    public Map<String, Object> getParams()
    {
        if (params == null)
        {
            params = new HashMap<>();
        }
        return params;
    }

    public void setParams(Map<String, Object> params)
    {
        this.params = params;
    }

}
